import request from '@/utils/request'

/**
 * 下游通知开关
 * @param data
 * @returns {AxiosPromise}
 */
export function noticeUpSwitch(data) {
  return request({
    url: '/downshopinfo/noticeUpSwitch',
    method: 'post',
    data
  })
}

/**
 * 失败订单
 * @param data
 * @returns {AxiosPromise}
 */
export function failtOrder(data) {
  return request({
    url: '/downrechargeflow/failtOrder',
    method: 'post',
    data
  })
}

/**
 * 批量失败订单
 * @param data
 * @returns {AxiosPromise}
 */
export function failtOrderList(data) {
  return request({
    url: '/downrechargeflow/failtOrderList',
    method: 'post',
    data
  })
}

/**
 * 批量重提
 * @param data
 * @returns {AxiosPromise}
 */
export function repeatFlowOrder(data) {
  return request({
    url: '/downrechargeflow/repeatFlowOrder',
    method: 'post',
    data
  })
}

/**
 * 成功订单
 * @param data
 * @returns {AxiosPromise}
 */
export function successOrder(data) {
  return request({
    url: '/downrechargeflow/successOrder',
    method: 'post',
    data
  })
}

/**
 * 批量成功订单
 * @param data
 * @returns {AxiosPromise}
 */
export function successOrderList(data) {
  return request({
    url: '/downrechargeflow/successOrderList',
    method: 'post',
    data
  })
}

/**
 * 分销信息查询
 * @param data
 * @returns {AxiosPromise}
 */
export function findDownShopPage(data) {
  return request({
    url: '/downshopinfo/findDownShopPage',
    method: 'post',
    data
  })
}

/**
 * 通知
 * @param data
 * @returns {AxiosPromise}
 */
export function noticeDownSwitch(data) {
  return request({
    url: '/downshopinfo/noticeDownSwitch',
    method: 'post',
    data
  })
}

/**
 * 渠道状态关闭
 * @param data
 * @returns {AxiosPromise}
 */
export function handleEnableShop(data) {
  return request({
    url: '/user/handleEnableShop',
    method: 'post',
    data
  })
}

/**
 * 关闭
 * @param data
 * @returns {AxiosPromise}
 */
export function handleEnableShopIsOpen(data) {
  return request({
    url: '/user/handleEnableShopIsOpen',
    method: 'post',
    data
  })
}

/**
 * 更新分销密钥
 * @param data
 * @returns {AxiosPromise}
 */
export function updateDownShopKey(data) {
  return request({
    url: '/downshopinfo/updateDownShopKey',
    method: 'post',
    data
  })
}

/**
 * 分享充值
 * @param data
 * @returns {AxiosPromise}
 */
export function downRecharge(data) {
  return request({
    url: '/downrecharge/downRecharge',
    method: 'post',
    data
  })
}

/**
 * 查询分销详情
 * @param data
 * @returns {AxiosPromise}
 */
export function findOneDownShop(data) {
  return request({
    url: '/downshopinfo/findOneDownShop',
    method: 'post',
    data
  })
}

/**
 * 创建分销信息
 * @param data
 * @returns {AxiosPromise}
 */
export function addDownShop(data) {
  return request({
    url: '/user/addUser',
    method: 'post',
    data
  })
}

/**
 * 更新分销信息
 * @param data
 * @returns {AxiosPromise}
 */
export function updateDownShop(data) {
  return request({
    url: '/user/updateUser',
    method: 'post',
    data
  })
}

/**
 * 导出分销充值记录
 * @param data
 * @returns {AxiosPromise}
 */
export function exportdataRechargeRecord(data) {
  return request({
    url: '/downrecharge/exportdataRechargeRecord',
    method: 'post',
    data
  })
}


/**
 * 查询充值记录
 * @param data
 * @returns {AxiosPromise}
 */
export function findRechargeRecord(data) {
  return request({
    url: '/downrecharge/findRechargeRecord',
    method: 'post',
    data
  })
}

/**
 * 分销充值记录统计
 * @param data
 * @returns {AxiosPromise}
 */
export function downRechargeRecordCount(data) {
  return request({
    url: '/downrecharge/downRechargeRecordCount',
    method: 'post',
    data
  })
}

/**
 * 产品分销查询
 * @param data
 * @returns {AxiosPromise}
 */
export function findPageDownProduct(data) {
  return request({
    url: '/downproduct/findPageDownProduct',
    method: 'post',
    data
  })
}

/**
 * 分销产品导出
 * @param data
 * @returns {AxiosPromise}
 */
export function exportDownProduct(data) {
  return request({
    url: '/downproduct/exportDownProduct',
    method: 'post',
    data
  })
}

/**
 * 删除产品
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteDownProduct(data) {
  return request({
    url: '/downproduct/deleteDownProduct',
    method: 'post',
    data
  })
}

/**
 * 产品启用 禁用
 * @param data
 * @returns {AxiosPromise}
 */
export function productDownEnable(data) {
  return request({
    url: '/downproduct/productDownEnable',
    method: 'post',
    data
  })
}

/**
 * 下游产品匹配查询
 * @param data
 * @returns {AxiosPromise}
 */
export function downProductMatchFind(data) {
  return request({
    url: '/upproduct/downProductMatchFind',
    method: 'post',
    data
  })
}

/**
 * 定时配置查询
 * @param data
 * @returns {AxiosPromise}
 */
export function queryProductTimerPage(data) {
  return request({
    url: '/productTimer/queryProductTimerPage',
    method: 'post',
    data
  })
}

/**
 * 更新执行状态
 * @param data
 * @returns {AxiosPromise}
 */
export function updateProductTimer(data) {
  return request({
    url: '/productTimer/updateProductTimer',
    method: 'post',
    data
  })
}

/**
 * 调价明细
 * @param data
 * @returns {AxiosPromise}
 */
export function detailProductTimer(data) {
  return request({
    url: '/productTimer/detailProductTimer',
    method: 'post',
    data
  })
}

/**
 * 手动执行调价
 * @param data
 * @returns {AxiosPromise}
 */
export function executeProductTimer(data) {
  return request({
    url: '/productTimer/executeProductTimer',
    method: 'post',
    data
  })
}

/**
 * 查询配置策略
 * @param data
 * @returns {AxiosPromise}
 */
export function queryStrategyPage(data) {
  return request({
    url: '/productstrategy/queryStrategyPage',
    method: 'post',
    data
  })
}

/**
 * 更新执行顺序
 * @param data
 * @returns {AxiosPromise}
 */
export function updateStrategy(data) {
  return request({
    url: '/productstrategy/updateStrategy',
    method: 'post',
    data
  })
}

/**
 * 下游订单查询
 * @param data
 * @returns {AxiosPromise}
 */
export function findDownOrder(data) {
  return request({
    url: '/downrechargeflow/findDownOrder',
    method: 'post',
    data
  })
}

/**
 * 状态回调
 * @param data
 * @returns {AxiosPromise}
 */
export function statusCallBack(data) {
  return request({
    url: '/downrechargeflow/statusCallBack',
    method: 'post',
    data
  })
}

/**
 * 分销订单导出
 * @param data
 * @returns {AxiosPromise}
 */
export function exportdataFlowOrder(data) {
  return request({
    url: '/downrechargeflow/exportdataFlowOrder',
    method: 'post',
    data
  })
}

/**
 * 查询分销订单日志
 * @param data
 * @returns {AxiosPromise}
 */
export function findDownOrderLog(data) {
  return request({
    url: '/downorderlog/findDownOrderLog',
    method: 'post',
    data
  })
}

/**
 * 查询退款记录
 * @param data
 * @returns {AxiosPromise}
 */
export function findPageOrderRefund(data) {
  return request({
    url: '/downorderrefund/findPageOrderRefund',
    method: 'post',
    data
  })
}

/**
 * 产品日期
 * @param data
 * @returns {AxiosPromise}
 */
export function findDownProductLog(data) {
  return request({
    url: '/downproductlog/findDownProductLog',
    method: 'post',
    data
  })
}

/**
 * 分销退款记录
 * @param data
 * @returns {AxiosPromise}
 */
export function findPageDebitLog(data) {
  return request({
    url: '/debitlog/findPageDebitLog',
    method: 'post',
    data
  })
}

/**
 * 零点余额
 * @param data
 * @returns {AxiosPromise}
 */
export function zeroBalance(data) {
  return request({
    url: '/zeroBalance/find',
    method: 'post',
    data
  })
}

export function queryBillDown(data) {
  return request({
    url: '/billOrder/queryBillDown',
    method: 'post',
    data
  })
}

/**
 * 分销对账单生成
 * @param data
 * @returns {AxiosPromise}
 */
export function generateBillDown(data) {
  return request({
    url: '/billOrder/generateBillDown',
    method: 'post',
    data
  })
}

/**
 * 查询下游分销产品
 * @param data
 * @returns {AxiosPromise}
 */
export function findBatchEditDownProduct(data) {
  return request({
    url: '/downproduct/findBatchEditDownProduct',
    method: 'post',
    data
  })
}

/**
 * 批量编辑产品查询
 * @param data
 * @returns {AxiosPromise}
 */
export function batchEditDownProduct(data) {
  return request({
    url: '/downproduct/batchEditDownProduct',
    method: 'post',
    data
  })
}

/**
 * 折扣批量保持
 * @param data
 * @returns {AxiosPromise}
 */
export function batchEditDownProductAll(data) {
  return request({
    url: '/downproduct/batchEditDownProductAll',
    method: 'post',
    data
  })
}

/**
 * 批量新增产品
 * @param data
 * @returns {AxiosPromise}
 */
export function addDownBatchProduct(data) {
  return request({
    url: '/downproduct/addDownBatchProduct',
    method: 'post',
    data
  })
}

/**
 * 批量关闭
 * @param data
 * @returns {AxiosPromise}
 */
export function handleBatchClose(data) {
  return request({
    url: '/downproduct/handleBatchClose',
    method: 'post',
    data
  })
}

/**
 * 批量自动匹配产品
 * @param data
 * @returns {AxiosPromise}
 */
export function autoProduct(data) {
  return request({
    url: '/downproduct/autoProduct',
    method: 'post',
    data
  })
}

/**
 * 添加配置策略
 * @param data
 * @returns {AxiosPromise}
 */
export function addProductStrategy(data) {
  return request({
    url: '/productstrategy/addProductStrategy',
    method: 'post',
    data
  })
}

/**
 * 复制产品
 * @param data
 * @returns {AxiosPromise}
 */
export function copyDownBatchProduct(data) {
  return request({
    url: '/downproduct/copyDownBatchProduct',
    method: 'post',
    data
  })
}

/**
 * 批量定时产品
 * @param data
 * @returns {AxiosPromise}
 */
export function batchProductTimer(data) {
  return request({
    url: '/productstrategy/batchProductTimer',
    method: 'post',
    data
  })
}

/**
 * 更新产品
 * @param data
 * @returns {AxiosPromise}
 */
export function updateProduct(data) {
  return request({
    url: '/downproduct/updateProduct',
    method: 'post',
    data
  })
}

/**
 * 查询单个产品
 * @param data
 * @returns {AxiosPromise}
 */
export function findOneProduct(data) {
  return request({
    url: '/downproduct/findOneProduct',
    method: 'post',
    data
  })
}

/**
 * 分销产品查询
 * @param data
 * @returns {AxiosPromise}
 */
export function downfindlist(data) {
  return request({
    url: '/downproductcode/findList',
    method: 'post',
    data
  })
}

/**
 * 修改密码
 * @param data
 * @returns {AxiosPromise}
 */
export function updateUserPassword(data) {
  return request({
    url: '/user/updateUserPassword',
    method: 'post',
    data
  })
}



